
clear all

use "data.dta"

sort id year

collapse ///
(mean) ///
fed_exec_form ///
fed_exec_past ///
fed_exec_infm ///
fed_legs_form ///
fed_legs_infm ///
reg_exec_form ///
reg_exec_infm ///
reg_legs_form ///
(first) ///
year_first = year ///
asset_first = log_asset ///
sector_first = sector ///
(last) ///
year_last = year ///
asset_last= log_asset ///
sector_last = sector ///
, ///
by(id)

gen asset_change = asset_last - asset_first

gen time = year_last - year_first

drop if time == 0

gen asset_growth = asset_change / time * 7

gen sector_change = (sector_first!=sector_last)

reg ///
asset_growth ///
fed_exec_form ///
fed_exec_past ///
fed_exec_infm ///
fed_legs_form ///
fed_legs_infm ///
reg_exec_form ///
reg_exec_infm ///
reg_legs_form ///
i.sector_first ///
sector_change
